package com.usian.springBoot.controller;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloWorldController {

    @Autowired
    DruidDataSource dataSource;

    @Autowired
    DruidDataSource dataSource1;

    @RequestMapping("hello")
    @ResponseBody
    public String hello(){

        return "hello world";
    }

    @RequestMapping("world")
    @ResponseBody
    public String world(){
        return "world = >"+dataSource.getUrl();
    }

    @RequestMapping("test")
    @ResponseBody
    public String test(){
        return "test = >"+dataSource.getUrl();
    }
}
